package com.lushu.chapitre1.net.services
{
	import com.lushu.net.php.BaseRemotingService;
	import com.lushu.net.php.RemotingService;
	import com.lushu.net.php.messages.AbstractMessage;
	import com.lushu.net.php.messages.CommandMessage;
import com.sfdk.net.php.BaseRemotingService;

import flash.net.Responder;

	public class UserService extends BaseRemotingService
	{
		private static var _instance : UserService;
		
		public function UserService()
		{
			super("users");
			_instance = this;
		}
		
		public static function get instance(): UserService
		{
			if(_instance == null)
				_instance = new UserService();
			return _instance;
		}
		
		public static function logonUser(onResult : Function, onFault : Function, userName : String, password : String) : void
		{
			instance.call("logonUser", new Responder(onResult, onFault), userName, password);
		}
		
		public static function logonUserResponder(responder : Responder, userName : String, password : String) : void
		{
			instance.call("logonUser", responder, userName, password);
		}
	}
}